home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Skunkware 5
/
Skunkware 5.iso
/
src
/
X11
/
scripts
/
ademo
next >
Wrap
Text File
|
1995-07-17
|
5KB
|
251 lines
:
#
# ademo - written November 1993 by Ron Record (rr@sco.com)
#
WIDTH=1024
HEIGHT=768
PATH=/usr/skunk/bin:/usr/skunk/bin/X11:$PATH
export PATH
BITMAP=/usr/include/X11/bitmaps/escherknot
PROG=$0
anim=/usr/skunk/pics/anim
avi=$anim/avi
flc=$anim/flc
fli=$anim/fli
mpeg=$anim/mpeg
Usage() {
echo "Usage: $PROG [-avi|-flc|fli|mpeg|xroot|lyap|mandel|curve|julia|tiff|xtopo]"
echo "Where :\n\t-avi indicates run the AVI format animations"
echo "\t-flc indicates run the FLC format animations"
echo "\t-fli indicates run the FLI format animations"
echo "\t-mpeg indicates run the MPEG format animations"
echo "\t-xroot indicates run the root window demonstrations"
echo "\t-lyap indicates run the Lyapunov Set demonstrations"
echo "\t-mandel indicates run the Mandelbrot Set demonstrations"
echo "\t-curve indicates run the spline curve demonstrations"
echo "\t-julia indicates run the Julia Set demonstrations"
echo "\t-tiff indicates run the TIFF format demonstrations"
echo "\t-xtopo indicates run the topographic map demonstrations"
echo "\tAn argument prefix of + indicates exclusion of that demonstration."
echo "\n$PROG is a shell script front-end for several animation demos and"
echo "graphical X clients written by Ronald Joe Record. When invoked with"
echo "no arguments it cycles through all of the demos."
echo "In this way, $PROG makes an excellent rolling demo.\n"
exit 1
}
SetOffsets() {
XOFF=`expr $WIDTH - $1`
XOFF=`expr $XOFF / 2`
YOFF=`expr $HEIGHT - $2`
YOFF=`expr $YOFF / 2`
}
PlayMpeg() {
[ -f $1 ] && mpeg_play -quiet $1 > /dev/null 2>&1
}
RootDemo() {
[ "$xflag" ] && {
xroot -e
xroot -l
xroot -j
xroot -k
xroot -h
}
case "$1" in
-b*) [ "$bflag" ] && xclnt -Q -R -limit 1 $1
;;
-j*) [ "$jflag" ] && xclnt -Q -R -limit 1 $1
;;
-l*) [ "$lflag" ] && xclnt -Q -R -limit 1 $1
;;
-m*) [ "$Mflag" ] && xclnt -Q -R -limit 1 $1
;;
-g*) [ "$gflag" ] && xclnt -Q -R -limit 1 $1
;;
esac
/usr/bin/X11/xsetroot -fg black -bg blue -bitmap $BITMAP
}
mflag=
aflag=
fflag=
Fflag=
xflag=
lflag=
jflag=
bflag=
Mflag=
tflag=
gflag=
[ $# = 0 ] && {
mflag=1
aflag=1
fflag=1
Fflag=1
xflag=1
lflag=1
jflag=1
bflag=1
Mflag=1
tflag=1
gflag=1
}
while case "$1" in
+mpeg) mflag=0
;;
+avi) aflag=0
;;
+flc) fflag=0
;;
+fli) Fflag=0
;;
+xroot) xflag=0
;;
+lyap) lflag=0
;;
+curve) bflag=0
;;
+julia) jflag=0
;;
+mandel)
Mflag=0
;;
+tiff) tflag=0
;;
+xtopo) gflag=0
;;
-mpeg) mflag=1
;;
-avi) aflag=1
;;
-flc) fflag=1
;;
-fli) Fflag=1
;;
-xroot) xflag=1
;;
-lyap) lflag=1
;;
-curve) bflag=1
;;
-julia) jflag=1
;;
-mandel)
Mflag=1
;;
-tiff) tflag=1
;;
-xtopo) gflag=1
;;
"") break
;;
*) Usage
;;
esac
do
shift
done
trap '/usr/bin/X11/xset s default; rm -f /tmp/ademo_stop; exit 1' 1 2 3 9 15
echo "kill -9 $$" > /tmp/ademo_stop
/usr/bin/X11/xset s off
while true
do
/usr/bin/X11/xsetroot -fg black -bg blue -bitmap $BITMAP
[ "$aflag" ] && {
xanim +Ss2 +Ze -Zr +l2 $avi/OpenServer.avi
}
RootDemo -m
[ "$fflag" ] && {
xanim +Ze -Zr +l1 $flc/outpost.flc
xanim +Ze -Zr +l1 $flc/pent.flc
xanim +Ze -Zr +l1 $flc/gulls.flc
}
RootDemo -g
[ "$fflag" ] && {
xanim +Ss2 +Ze -Zr +lp2 $flc/scointro.flc
}
RootDemo -l2
[ "$fflag" ] && {
xanim +Ze -Zr +l1 $flc/power.flc
xanim +Ze -Zr +l1 $flc/training.flc
}
RootDemo -j2
[ "$aflag" ] && {
xanim +Ze -Zr +l2 $avi/OpenServer.avi
}
RootDemo -m2
[ "$mflag" ] && {
PlayMpeg $mpeg/bigbend.mpg
}
RootDemo -d
[ "$fflag" ] && {
xanim +Ze -Zr +l1 $flc/rube.flc
}
RootDemo -l3
[ "$mflag" ] && {
PlayMpeg $mpeg/c4.mpg
}
RootDemo -b
[ "$mflag" ] && {
PlayMpeg $mpeg/b0.mpg
}
RootDemo -j3
[ "$mflag" ] && {
PlayMpeg $mpeg/BigE_Anim.mpg
}
RootDemo -m3
[ "$mflag" ] && {
PlayMpeg $mpeg/grand.mpg
PlayMpeg $mpeg/hula_2.mpg
}
RootDemo -p
[ "$mflag" ] && {
PlayMpeg $mpeg/map23b.mpg
PlayMpeg $mpeg/map23b_c.mpg
PlayMpeg $mpeg/map23b3.mpg
}
RootDemo -l4
[ "$mflag" ] && {
PlayMpeg $mpeg/BigE_Accel.mpg
}
RootDemo -j4
[ "$Fflag" ] && {
xanim +Ze -Zr +l1 $fli/spacshi2.fli
}
RootDemo -m4
RootDemo -h
RootDemo -l5
[ "$fflag" ] && {
xanim +Ze -Zr +lp2 $flc/scointro.flc
}
RootDemo -j5
RootDemo -m5
[ "$Fflag" ] && {
xanim +Ze -Zr +l1 $fli/cwhat.fli
}
RootDemo -j6
[ "$Fflag" ] && {
xanim +Ze -Zr +l1 $fli/eartrivi.fli
}
RootDemo -l6
[ "$Fflag" ] && {
xanim +Ze -Zr +l1 $fli/explod_4.fli
xanim +Ze -Zr +l1 $fli/firerave.fli
}
RootDemo -j7
[ "$Fflag" ] && {
xanim +Ze -Zr +l1 $fli/globe4.fli
}
RootDemo -l7
RootDemo -s
done > /dev/null 2>&1
/usr/bin/X11/xset s default